﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Baosight.Platform.Core.UI.Controls;
using Telerik.Windows.Controls;
using Baosight.ZNH.ZMCommon;
using Baosight.ZNH.ZM.UI;
using Baosight.Platform.Core.UI;
using Baosight.Platform.Core;
using Baosight.Platform.Core.ServiceModel;
using Telerik.Windows.Controls.GridView;
using Microsoft.Practices.Unity;
using System.Windows.Media.Imaging;
using Baosight.ZNH.ZM.UI.Controls;

namespace Baosight.ZNH.ZM.UI
{
    /// <summary>
    /// 首页显示
    /// /// </summary>
    /// Title:ZM90
    /// Copyright:Baosight Software LTD.co Copyright (c) 2011
    /// Company:上海宝信软件股份有限公司
    /// Author: 高强
    /// Version: 1.0
    /// History:
    ///       2012-11-07 高强   [创建]
    ///  
    ///
    public partial class ZM90 : EFViewCmes
    {
        public ZM90()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 初始化
        /// </summary>
        /// <param name="initData"></param>
        public override void Initialize(EIInfo initData)
        {
            base.Initialize(initData);
            LoadData(initData);
        }

        /// <summary>
        /// 获得数据
        /// </summary>
        /// <param name="initData"></param>
        private void LoadData(EIInfo initData)
        {
            EIBlock indexBlock = initData.GetBlock("index");
            HomePageBuild build = new HomePageBuild();
            HomeContainer container = build.Build(indexBlock);

            LayoutBasicIndex.Children.Add(container);
        }

        /// <summary>
        /// 加载页面
        /// </summary>
        /// <param name="view"></param>
        public void LinkView(string view)
        {
            Dictionary<string, string> args = new Dictionary<string, string>();
            args.Add("view", view);
            Shell.LoadView(view,args);
        }
    }
}
